package com.springboot.auth.authorization.controller;

import com.springboot.auth.authorization.model.common.ResponseModel;
import com.springboot.auth.authorization.model.vo.CaptchaVO;
import com.springboot.auth.authorization.provider.AuthcodeProvider;
import com.springboot.auth.authorization.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@RestController
@RequestMapping("/captcha")
public class CaptchaController {

    @Autowired
    private AuthcodeProvider authcodeProvider;


    @PostMapping("/get")
    public ResponseModel get(@RequestBody CaptchaVO captchaVO) {
        return authcodeProvider.get(captchaVO);
    }

    @PostMapping("/check")
    public ResponseModel check(@RequestBody CaptchaVO captchaVO) {
        return authcodeProvider.check(captchaVO);
    }

    @PostMapping("/verify")
    public ResponseModel verify(@RequestBody CaptchaVO captchaVO) {
        return authcodeProvider.verify(captchaVO);
    }


}
